//
//  UILable+Extension.swift
//  上海微博
//
//  Created by co on 16/2/26.
//  Copyright © 2016年 王南侠. All rights reserved.
//

import UIKit

extension UILabel{
    
    // 参数过多我们可以初始值
    
    /**
    *  创建UILable
    *
    *  @param                   text
    *  @param fountSize:CGFloat fountSize:默认14
    @prame color            color默认darkGrayColor
    *  @param .Left             .Left 默认左对齐
    *  @return UILable
    */
    convenience init(cz_text text: String,
        fountSize:CGFloat = 14,
        color: UIColor = UIColor.darkGrayColor(),
        aligment: NSTextAlignment = .Left){
            
            self.init()
            
            self.text = text
            //  有时候敲属性会不显示需要手打
            self.textColor = color
            self.font = UIFont.systemFontOfSize(fountSize)
            self.textAlignment = aligment
            
            self.numberOfLines = 0
            
            // 自动调整大小
            sizeToFit()
            
    }
    
    
}
